//导入请求工具类
import request from '@/utils/request.js'
//获取用户信息
export const selectUserService = () => {
  return request.get("/user/selectUserInfo");
};

//修改用户信息
export const updateUserInfoService = (userInfo) => {
  return request.put('/user/updateUser', userInfo);
};

//修改头像
export const updatePicService = (avatarUrl) => {
  let params = new URLSearchParams();
  params.append('userAvatar', avatarUrl)
  return request.put('/user/updatePic', params)
};

//注销账号
export const deleteUserService = () => {
  return request.delete("/user/deleteUser");
};
//修改密码
export const updatePwdOne = (pwdModel) => {
  return request.put("/user/updatePwd", pwdModel);
};
